#pragma once
#include<iostream>
#define valueType int
using namespace std;
namespace GIS20151
{
	struct node
	{
		valueType value;
		node* next=nullptr;
	};
	void function1(node* root,node* maxnode)
	{
		if (root == nullptr)
			return;
		if (root->value > maxnode->value || maxnode == nullptr)
			maxnode = root;
		function1(root->next,maxnode);
	}

	int function2(node* root)
	{
		node* maxnode = nullptr;
		function1(root, maxnode);
		cout << maxnode->value;
		return maxnode->value;
	}
}